﻿//
//For Select ALL
//
function SelectClass(chkObj, objID) {
    this.chkobject = chkObj;
    this.objectID = objID;
    this.table = null;
}
SelectClass.prototype.getObj = function() {
    var tables = document.getElementsByTagName("TABLE");
    for (var i = 0; i < tables.length; i++) {
        if (tables[i].id == this.objectID) {
            this.table = tables[i];
            break;
        }
    }
}
SelectClass.prototype.selectAll = function() {
    if (this.table != null) {
        var inputs = this.table.getElementsByTagName("INPUT");
        for (var i = 0; i < inputs.length; i++) {
            var element = inputs[i];
            if (element.type == "checkbox" && element.disabled == false) {
                //alert(element.disabled);
                element.checked = this.chkobject.checked;
            }
        }
    }
}

//For Selecting All Obj
function SelectAllObj(chkObj, objID) {
    var selectAllObj = new SelectClass(chkObj, objID);
    selectAllObj.getObj();
    selectAllObj.selectAll();
}

function SelectMiddleCheckBox(chkObj, subTableID) {
}
